using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.Xna.Framework;

namespace HappySprite.Tests
{
    public static class AssertExtensions
    {
        const float Epsilon = 1e-03f;

        public static void AreEqual(float f1, float f2)
        {
            Assert.IsTrue(Math.Abs(f2 - f1) < Epsilon, "Expected: <{0}>, Actual: <{1}>.", f1, f2);
        }

        public static void AreEqual(Vector2 v1, Vector2 v2)
        {
            Assert.IsTrue((v2 - v1).Length() < Epsilon, "Expected: <{0}>, Actual: <{1}>.", v1, v2);
        }

        public static void AreEqual(Vector3 v1, Vector3 v2)
        {
            Assert.IsTrue((v2 - v1).Length() < Epsilon, "Expected: <{0}>, Actual: <{1}>.", v1, v2);
        }
    }
}
